home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6735 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: Inter.NL.net!usenet
  2. From: E.H.Terwiel@inter.NL.net (E.H. Terwiel (Erik))
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Can anyone help me on this?
  5. Date: Wed, 14 Feb 1996 18:36:05 GMT
  6. Organization: Inter.NL.net, The Internet Provider in The Netherlands.
  7. Message-ID: <4ftaal$700@altrade.nijmegen.inter.nl.net>
  8. References: <1856360.ensmtp@usenet.ggu.edu>
  9. NNTP-Posting-Host: utr98-15.utrecht.nl.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. elaw@usenet.ggu.edu (Elaine Law) wrote:
  13.  
  14. >A text comparison program that accepts two files as input & compares each word
  15. >of text and outputs corresponding excerpts of the two files that are different
  16. >to the screen. If the two files are identical, the program responds by
  17. >outputting line numbers at regular intervals as follows:
  18. >line 25:
  19. >line 50:
  20. >line 75:
  21.  
  22. >Programs input:
  23. >The name of two files to be compared entered by the user.
  24. >The number of sequentially occurring words matched between the two files (a
  25. >treshold value) for the program to be considered textual mismatch to no longer
  26. >exist.  Be sure to bound check this number.
  27.  
  28. >Programs output:
  29. >Screen output showling line numbers periodically and textual quotes from both
  30. >files corresponding to the differences found.
  31.  
  32. >Programming Hints:
  33. >First your program needs to access two input files, it makes sense to create a
  34. >file access ADT that can service both input files rather than having two sets
  35. >of customized input file service together.
  36.  
  37. >Next, you need to determine how you are going to actually do this textual
  38. >compairson.  One of the better ways of doing a textual compairon is based on
  39. >reading words from both files and keeping a line number counter updated for
  40. >both files.  As long as words from both files are identical, this continues.
  41.  
  42.  
  43.  
  44. Sounds like an AWK aplication ......
  45. Erik
  46.  
  47.  
  48.  
  49.